<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateBaseLogTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('base_log', function (Blueprint $table) {
            $table->increments('id');
            $table->string('route',200)->comment('路由');
            $table->string('user_name',200)->comment('操作人');
            $table->text('request')->comment('请求内容');
            $table->timestamps();
            $table->index('route', 'idx_route');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('base_log');
    }
}
